home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_04
/
9n04039b
< prev
next >
Wrap
Text File
|
1991-02-04
|
516b
|
24 lines
EVENT_MSG event; /* allocate space for an event message
*/
draw_screen(); /* put up your window */
for(;;)
{
/* receive the message from QNX Windows */
GetEvent(0, &event, sizeof(EVENT_MSG));
/* extract the message type, and act appropriately */
switch(Event(&event))
{
case CLICK: /* somebody clicked the mouse */
do_something();
continue;
case QUIT: /* the user wants to quit */
case TERMINATED: /* the server is being shut down */
shutdown();
exit(0);
}
}